﻿#include "dialogprotocalconfig.h"
#include "ui_dialogprotocalconfig.h"

DialogProtocalConfig::DialogProtocalConfig(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::DialogProtocalConfig)
{
    ui->setupUi(this);
    connectSlots();
}

DialogProtocalConfig::~DialogProtocalConfig()
{
    delete ui;
}

void DialogProtocalConfig::SetSheetName(const QStringList &sheetList)
{
    ui->comboBox_trdpProtocal->addItems(sheetList);
    ui->comboBox_trdpProtocal->setCurrentIndex(0);
}

QString DialogProtocalConfig::GetSelectItem()
{
    return _selectItem;
}

void DialogProtocalConfig::connectSlots()
{
    connect(ui->comboBox_trdpProtocal, QOverload<const QString &>::of(&QComboBox::currentIndexChanged),
        [=](const QString &text){ _selectItem=text; });

}
